package com.liurq.dubboproducer.service;

import org.liurq.DubboService;
import org.liurq.Person;
import org.springframework.beans.factory.annotation.Value;

@com.alibaba.dubbo.config.annotation.Service
@org.springframework.stereotype.Service
public class DubboServiceImpl implements DubboService {

    @Value("${server.port}")
    private String port;

    @Override
    public Person getPerson(String name, int age) {
        Person person = new Person();
        person.setAge(age);
        person.setName(name);
        System.out.println("port:" + port + " thread:" + Thread.currentThread().getName());
        return person;
    }

}
